import request from '@/utils/request'
import { Form } from 'element-ui'

export function getsubject() {
  return request({
    url: `/subject/getSubject`,
    method: 'get'
  })
}

export function addsubject(subjectform) {
  return request({
    url: `/subject/addsubject`,
    method: 'post',
    data:subjectform
  })
}

export function removesubject(id) {
  return request({
    url: `/subject/removesubject/${id}`,
    method: 'delete'
  })
}

export function gethead(username) {
  return request({
    url: `/head/gethead/${username}`,
    method: 'get'
  })
}

export function getdata(username) {
  return request({
    url: `/echarts/getdata/${username}`,
    method: 'get'
  })
}

export function submitform(from) {
  return request({
    url: `/api/users`,
    method: 'post',
    data:from
  })
}




export default { getsubject,addsubject,removesubject,gethead,getdata,submitform}
